#include "tcp_server.hpp"
#include <memory>
#include <cstdlib>
#include <iostream>

static void usage(std::string proc)
{
    std::cout << "\nUsage: " << proc << " port\n"
              << std::endl;
}

int main(int argc /*命令行参数个数*/, char *argv[])
{
    if (argc != 2)
    {
        usage(argv[0]);
        exit(1);
    }

    uint16_t port = atoi(argv[1]);
    // std::string ip=argv[0];
    TcpServer *svr = new TcpServer(port);
    svr->initServer();
    svr->Start();
    return 0;
}